using System;
using Common.Enumerations;
using Newtonsoft.Json;
using PetaPoco;
using Sanelib.DataView;

namespace Common.Views
{
	[TableName("HealthView")]
	public class HealthView : IView
	{
		public Guid Id { get; set; }
        [JsonIgnore]
        public HealthType HealthType { get; set; }
        public string HealthTypeValue { get { return HealthType == null ? "" : HealthType.Value; } set { HealthType = HealthType.FromValue(value); } }
        public string HealthTypeName { get { return HealthType == null ? "" : HealthType.DisplayName; } set { HealthType = HealthType.FromDisplay(value); } }
        public string Value { get; set; }
		public DateTime? RecordTime { get; set; }
	}
}
